package cn.gson.springboot.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the medical_card_px database table.
 * 
 */
@Entity
@Table(name="medical_card_px")
@NamedQuery(name="MedicalCardPx.findAll", query="SELECT m FROM MedicalCardPx m")
public class MedicalCardPx implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="mzcard_id")
	private int mzcardId;

	private BigDecimal bkje;

	@Column(name="card_cid")
	private String cardCid;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="card_date")
	private Date cardDate;

	@Column(name="home_address")
	private String homeAddress;

	@Column(name="mecard_number")
	private String mecardNumber;

	@Column(name="medicalcard_state")
	private int medicalcardState;

	@Column(name="mzcard_phone")
	private String mzcardPhone;

	@Column(name="patient_age")
	private int patientAge;

	@Column(name="patient_name")
	private String patientName;

	@Column(name="patient_sex")
	private String patientSex;

	private String ylkblr;
	
	private int did;

	public int getDid() {
		return did;
	}

	public void setDid(int did) {
		this.did = did;
	}

	//bi-directional many-to-one association to CureCostPx
	@OneToMany(mappedBy="medicalCardPx")
	private List<CureCostPx> cureCostPxs;

	//bi-directional many-to-one association to DrugrefundRecordtbPx
	@OneToMany(mappedBy="medicalCardPx")
	private List<DrugrefundRecordtbPx> drugrefundRecordtbPxs;

	//bi-directional many-to-one association to Examine
	@OneToMany(mappedBy="medicalCardPx")
	private List<Examine> examines;

	//bi-directional many-to-one association to Hospital
	@OneToMany(mappedBy="medicalCardPx")
	private List<Hospital> hospitals;

	//bi-directional many-to-one association to HospitalNotice
	@OneToMany(mappedBy="medicalCardPx")
	private List<HospitalNotice> hospitalNotices;

	//bi-directional many-to-one association to MedicalcarLoss
	@OneToMany(mappedBy="medicalCardPx")
	private List<MedicalcarLoss> medicalcarLosses;

	//bi-directional many-to-one association to RegisteredPx
	@OneToMany(mappedBy="medicalCardPx")
	private List<RegisteredPx> registeredPxs;

	//bi-directional many-to-one association to ReplaceTab
	@OneToMany(mappedBy="medicalCardPx")
	private List<ReplaceTab> replaceTabs;


	public MedicalCardPx() {
	}

	public int getMzcardId() {
		return this.mzcardId;
	}

	public void setMzcardId(int mzcardId) {
		this.mzcardId = mzcardId;
	}

	public BigDecimal getBkje() {
		return this.bkje;
	}

	public void setBkje(BigDecimal bkje) {
		this.bkje = bkje;
	}

	public String getCardCid() {
		return this.cardCid;
	}

	public void setCardCid(String cardCid) {
		this.cardCid = cardCid;
	}

	public Date getCardDate() {
		return this.cardDate;
	}

	public void setCardDate(Date cardDate) {
		this.cardDate = cardDate;
	}

	public String getHomeAddress() {
		return this.homeAddress;
	}

	public void setHomeAddress(String homeAddress) {
		this.homeAddress = homeAddress;
	}

	public String getMecardNumber() {
		return this.mecardNumber;
	}

	public void setMecardNumber(String mecardNumber) {
		this.mecardNumber = mecardNumber;
	}

	public int getMedicalcardState() {
		return this.medicalcardState;
	}

	public void setMedicalcardState(int medicalcardState) {
		this.medicalcardState = medicalcardState;
	}

	public String getMzcardPhone() {
		return this.mzcardPhone;
	}

	public void setMzcardPhone(String mzcardPhone) {
		this.mzcardPhone = mzcardPhone;
	}

	public int getPatientAge() {
		return this.patientAge;
	}

	public void setPatientAge(int patientAge) {
		this.patientAge = patientAge;
	}

	public String getPatientName() {
		return this.patientName;
	}

	public void setPatientName(String patientName) {
		this.patientName = patientName;
	}

	public String getPatientSex() {
		return this.patientSex;
	}

	public void setPatientSex(String patientSex) {
		this.patientSex = patientSex;
	}

	public String getYlkblr() {
		return this.ylkblr;
	}

	public void setYlkblr(String ylkblr) {
		this.ylkblr = ylkblr;
	}

	public List<CureCostPx> getCureCostPxs() {
		return this.cureCostPxs;
	}

	public void setCureCostPxs(List<CureCostPx> cureCostPxs) {
		this.cureCostPxs = cureCostPxs;
	}

	public CureCostPx addCureCostPx(CureCostPx cureCostPx) {
		getCureCostPxs().add(cureCostPx);
		cureCostPx.setMedicalCardPx(this);

		return cureCostPx;
	}

	public CureCostPx removeCureCostPx(CureCostPx cureCostPx) {
		getCureCostPxs().remove(cureCostPx);
		cureCostPx.setMedicalCardPx(null);

		return cureCostPx;
	}

	public List<DrugrefundRecordtbPx> getDrugrefundRecordtbPxs() {
		return this.drugrefundRecordtbPxs;
	}

	public void setDrugrefundRecordtbPxs(List<DrugrefundRecordtbPx> drugrefundRecordtbPxs) {
		this.drugrefundRecordtbPxs = drugrefundRecordtbPxs;
	}

	public DrugrefundRecordtbPx addDrugrefundRecordtbPx(DrugrefundRecordtbPx drugrefundRecordtbPx) {
		getDrugrefundRecordtbPxs().add(drugrefundRecordtbPx);
		drugrefundRecordtbPx.setMedicalCardPx(this);

		return drugrefundRecordtbPx;
	}

	public DrugrefundRecordtbPx removeDrugrefundRecordtbPx(DrugrefundRecordtbPx drugrefundRecordtbPx) {
		getDrugrefundRecordtbPxs().remove(drugrefundRecordtbPx);
		drugrefundRecordtbPx.setMedicalCardPx(null);

		return drugrefundRecordtbPx;
	}

	public List<Examine> getExamines() {
		return this.examines;
	}

	public void setExamines(List<Examine> examines) {
		this.examines = examines;
	}

	public Examine addExamine(Examine examine) {
		getExamines().add(examine);
		examine.setMedicalCardPx(this);

		return examine;
	}

	public Examine removeExamine(Examine examine) {
		getExamines().remove(examine);
		examine.setMedicalCardPx(null);

		return examine;
	}

	public List<Hospital> getHospitals() {
		return this.hospitals;
	}

	public void setHospitals(List<Hospital> hospitals) {
		this.hospitals = hospitals;
	}

	public Hospital addHospital(Hospital hospital) {
		getHospitals().add(hospital);
		hospital.setMedicalCardPx(this);

		return hospital;
	}

	public Hospital removeHospital(Hospital hospital) {
		getHospitals().remove(hospital);
		hospital.setMedicalCardPx(null);

		return hospital;
	}

	public List<HospitalNotice> getHospitalNotices() {
		return this.hospitalNotices;
	}

	public void setHospitalNotices(List<HospitalNotice> hospitalNotices) {
		this.hospitalNotices = hospitalNotices;
	}

	public HospitalNotice addHospitalNotice(HospitalNotice hospitalNotice) {
		getHospitalNotices().add(hospitalNotice);
		hospitalNotice.setMedicalCardPx(this);

		return hospitalNotice;
	}

	public HospitalNotice removeHospitalNotice(HospitalNotice hospitalNotice) {
		getHospitalNotices().remove(hospitalNotice);
		hospitalNotice.setMedicalCardPx(null);

		return hospitalNotice;
	}

	public List<MedicalcarLoss> getMedicalcarLosses() {
		return this.medicalcarLosses;
	}

	public void setMedicalcarLosses(List<MedicalcarLoss> medicalcarLosses) {
		this.medicalcarLosses = medicalcarLosses;
	}

	public MedicalcarLoss addMedicalcarLoss(MedicalcarLoss medicalcarLoss) {
		getMedicalcarLosses().add(medicalcarLoss);
		medicalcarLoss.setMedicalCardPx(this);

		return medicalcarLoss;
	}

	public MedicalcarLoss removeMedicalcarLoss(MedicalcarLoss medicalcarLoss) {
		getMedicalcarLosses().remove(medicalcarLoss);
		medicalcarLoss.setMedicalCardPx(null);

		return medicalcarLoss;
	}

	public List<RegisteredPx> getRegisteredPxs() {
		return this.registeredPxs;
	}

	public void setRegisteredPxs(List<RegisteredPx> registeredPxs) {
		this.registeredPxs = registeredPxs;
	}

	public RegisteredPx addRegisteredPx(RegisteredPx registeredPx) {
		getRegisteredPxs().add(registeredPx);
		registeredPx.setMedicalCardPx(this);

		return registeredPx;
	}

	public RegisteredPx removeRegisteredPx(RegisteredPx registeredPx) {
		getRegisteredPxs().remove(registeredPx);
		registeredPx.setMedicalCardPx(null);

		return registeredPx;
	}

	public List<ReplaceTab> getReplaceTabs() {
		return this.replaceTabs;
	}

	public void setReplaceTabs(List<ReplaceTab> replaceTabs) {
		this.replaceTabs = replaceTabs;
	}

	public ReplaceTab addReplaceTab(ReplaceTab replaceTab) {
		getReplaceTabs().add(replaceTab);
		replaceTab.setMedicalCardPx(this);

		return replaceTab;
	}

	public ReplaceTab removeReplaceTab(ReplaceTab replaceTab) {
		getReplaceTabs().remove(replaceTab);
		replaceTab.setMedicalCardPx(null);

		return replaceTab;
	}


}